package api

import request "gitee.com/changeden/volcengine-livesaas-request-go"

type PollingGraphicMessageRequest struct {
	ActivityId          *int64 `json:"ActivityId"`
	GraphicMessageId    *int64 `json:"GraphicMessageId"`
	GraphicMessageCount *int32 `json:"GraphicMessageCount"`
}
type PollingGraphicMessageResponse struct {
	GraphicMessages []PollingGraphicMessage `json:"GraphicMessages" gorm:"column:GraphicMessages"`
}
type PollingGraphicMessage struct {
	Context          []PollingGraphicMessageContext `json:"Context" gorm:"column:Context"`
	CreateTime       int64                          `json:"CreateTime" gorm:"column:CreateTime"`
	GraphicMessageID int64                          `json:"GraphicMessageId" gorm:"column:GraphicMessageId"`
	IsDelete         bool                           `json:"IsDelete" gorm:"column:IsDelete"`
}
type PollingGraphicMessageContext struct {
	GraphicMessageContext string `json:"GraphicMessageContext" gorm:"column:GraphicMessageContext"`
	GraphicMessageType    int32  `json:"GraphicMessageType" gorm:"column:GraphicMessageType"`
}

func (instance *Instance) PollingGraphicMessage(data *PollingGraphicMessageRequest) (*PollingGraphicMessageResponse, error) {
	d := request.Data{
		Action: "PollingGraphicMessageAPI",
	}
	bindQuery(&d, *data)
	var res PollingGraphicMessageResponse
	err := instance.get(&d, &res)
	return &res, err
}
